import App from './App.vue'
import i18n from './src/i18n/index.js'
import ylNavbar from "@components/ylNavBar.vue"


// #ifndef VUE3
import Vue from 'vue'
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
Vue.component("ylNavbar", ylNavbar) //全局navbar
Vue.config.productionTip = false
App.mpType = 'app'
const i18nV2 = new VueI18n({
	locale: 'zh', // 设置默认语言为中文
	messages: { // 设置支持的语言包
		en: en,
		zh: zh,
	},
});
const app = new Vue({
	i18nV2,
	...App
})
app.$mount()
// #endif


// #ifdef VUE3
import {
	createSSRApp
} from 'vue'

export function createApp() {
	const app = createSSRApp(App)
	app.use(i18n)
	app.component("ylNavbar", ylNavbar)
	return {
		app
	}
}
// #endif